package msg

const (
	AT_NONE   = 0
	AT_REGION = 1
	AT_WORLD  = 2
	AT_DB     = 3
	AT_GATE   = 4
	AT_LISTER = 5
)

const (
	APP_MSG_BASE = 21000 + iota
	APP_MSG_REG
	APP_MSG_PING
	APP_MSG_LIST
	APP_MSG_STATUS
)

const (
	APP_MSG_BAK_BASE = 22000 + iota
	APP_MSG_REG_BAK
	APP_MSG_PONG
	APP_MSG_LIST_BAK
)

type CenterMsg struct {
	BaseMsg
}

type AppInfo struct {
	AppId     uint64
	AppType   int
	AppIp     string
	AppPort   int
	LoadPoint int
}

type RegApp struct {
	BaseMsg
	App AppInfo
}

type RegAppBak struct {
	BaseMsg
	AppId uint64
}

type GetAppList struct {
	BaseMsg
	AppType int
}

type AppListBak struct {
	BaseMsg
	Apps []AppInfo
}

type Ping struct {
	BaseMsg
}

type Pong struct {
	BaseMsg
}

type Status struct {
	BaseMsg
	LoadPoint int
}
